﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Eassets.UI.Asset
{
    public partial class EassetMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
                String[] arrayTreePrograms = new string[1];
                arrayTreePrograms[0] = "~/Asset/FixedAssetsCategory.aspx";
                //arrayTreePrograms[1] = "FixedAssetsForm.aspx";
              
           

            if (arrayTreePrograms.Contains(Page.Request.AppRelativeCurrentExecutionFilePath))
            {
                tabContainerMenuTree.ActiveTabIndex = 1;
            }
            else if (tabContainerMenuTree.Tabs.Count > 1)
            {
                tabContainerMenuTree.Tabs.RemoveAt(1);
            }

        }

        protected void AssetCategory_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("FixedAssetsCategory.aspx");
            tabContainerMenuTree.ActiveTabIndex = 1;
        }

        protected void FixedAsset_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("FixedAssetsForm.aspx");
        }

        protected void AssetItemDetails_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("FixedAssetItemDetailsForm.aspx");
        }

        protected void CompanyAssets_Click(object sender, EventArgs e)
        {
            Response.Redirect("CompanyAssetForm.aspx");
        }

        protected void OrganizationLevelAsset_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("OrganizationLevelListAssetForm.aspx");
        }

        protected void AssetRequisition_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetsRequisitionsForm.aspx");
        }

        protected void linkLogOut_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx");
        }

        protected void AssetAquisition_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetProcurementForm.aspx");
        }

        protected void AssetDisposal_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetsDisposalForm.aspx");
        }

        protected void AssetRevaluation_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetsRevaluationForm.aspx");
        }
        protected void AssetTransferOut_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetsTransferOutForm.aspx");
        }

        protected void FixedAssetRegistry_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("FixedAssetRegistryForm.aspx");
        }

        protected void AssetDepreciation_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("AssetDepreciationForm.aspx");
        }

        protected void AssetCustodian_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("ChangeAssetCustodianForm.aspx");
        }

        protected void TransactionAuthorization_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("TransactionAuthorization.aspx");
        }

        protected void TransactionSummery_OnClick(object sender, EventArgs e)
        {
            Response.Redirect("TransactionSummaryForm.aspx");
        }
    }
}